import React from "react";
import "./App.css";
// 公共样式
import "./assest/style/common.css";
import "./assest/style/font/iconfont.css";
import {
  BrowserRouter as Router,
  Routes,
  Route,
  Navigate,
} from "react-router-dom";
import Home from "./home/home";
import Demand from "./demand/demand";
import Found from "./found/found";
import My from "./my/my";
// import Footer from "./Component/Footer";
// 子路由
import Destination from "./home/Destination/destination";
import HouseDetail from "./home/HouseDetail/houseDetail";
import Calendar from "./home/Calendar/calendar";
import List from "./home/list/list";
import PayNow from "./home/PayNow/payNow";
import SubmitOrders from "./home/SubmitOrders/submitOrders";
import Collection from "./my/Collection/collection";
import Main from "./my/Main/main";
import OrderList from "./my/Order/orderList";
import OrderDetail from "./my/Order/orderDetail";
import Track from "./my/Track/track";
import Login from "./login/login";

function App() {
  return (
    <div>
      <Router>
        <Routes>
          {/* 首页 */}
          <Route path="/" element={<Navigate to="/home" />}></Route>
          <Route path="/home" element={<Home />}>
            <Route index element={<List />} />
            <Route path="destination" element={<Destination />} />
            <Route path="houseDetail" element={<HouseDetail />} />
            <Route path="calendar" element={<Calendar />} />
            <Route path="list" element={<List />} />
            <Route path="payNow" element={<PayNow />} />
            <Route path="submitOrders" element={<SubmitOrders />} />
            <Route path="list" element={<List />} />
          </Route>
          {/* 提交需求 */}
          <Route path="/demand" element={<Demand />}></Route>
          {/* 发现 */}
          <Route path="/found" element={<Found />}></Route>
          {/* 我的 */}
          <Route path="/my" element={<My />}>
            <Route index element={<Main />} />
            <Route path="collection" element={<Collection />} />
            <Route path="main" element={<Main />} />
            <Route path="orderList" element={<OrderList />} />
            <Route path="orderDetail" element={<OrderDetail />} />
            <Route path="track" element={<Track />} />
          </Route>
          <Route path="/login" element={<Login />}></Route>
        </Routes>
        {/* <Footer /> */}
      </Router>
    </div>
  );
}

export default App;
